<template>
	<view class="search-wrapper">
		<view class="header">
			<u-icon name="arrow-left" color="#cccccc" size="22" @click="tiao"></u-icon>
			<u-search placeholder="搜索关键词" v-model="keyword"></u-search>
		</view>

		<u-tabs :list="list4" lineWidth="30" lineColor="#00cf8a" :activeStyle="{
	            color: '#00cf8a',
	            fontWeight: 'bold',
	            transform: 'scale(1.05)'
	        }" :inactiveStyle="{
	            color: '#606266',
	            transform: 'scale(1)'
	        }" itemStyle="padding-left: 15px; padding-right: 15px; height: 70rpx;">
		</u-tabs>

		<view class="new">
			<view class="box">
				<view class="left">
					<image src="../../static/article-active.png" mode=""></image>
				</view>
				<view class="right">
					<view class="top">踩踩踩踩踩踩踩踩踩踩踩</view>
					<view class="bo">
						<view class="left">
							￥222222
							<span>￥222222 </span>
						</view>
					</view>

				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list4: [{
					name: '课程'
				}, {
					name: '专栏',
				}],
			}
		},
		methods: {
			//返回上一级
			tiao() {
				uni.navigateBack({
					delta: 1
				})
			}
		}
	}
</script>

<style lang="scss">
	.search-wrapper {
		width: 100%;
		height: 100%;

		.header {
			padding: 15rpx;
			box-sizing: border-box;
			display: flex;
			height: 90rpx;

			.u-icon {
				margin-right: 10rpx;
			}
		}

		.u-tabs {
			width: 100%;
			display: flex;
			justify-content: space-around;
		}

		.new {
			width: 100%;

			.box {
				width: 100%;
				height: 214rpx;
				display: flex;
				// padding: 20rpx;
				// box-sizing: border-box;
				margin-top: 50rpx;

				// justify-content: space-between;
				.left {
					width: 200rpx;
					height: 100%;
					display: flex;
					justify-content: center;
					align-items: center;
					margin-right: 10rpx;

					image {
						width: 200px;
						height: 240rpx;
					}
				}

				.right {
					flex: 1;
					height: 100%;
					display: flex;
					flex-direction: column;
					justify-content: space-between;
					padding: 10rpx;
					box-sizing: border-box;

					.top {
						/* 1.溢出隐藏 */
						overflow: hidden;
						/* 2.用省略号来代替超出文本 */
						text-overflow: ellipsis;
						/* 3.设置盒子属性为-webkit-box  必须的 */
						display: -webkit-box;
						/* 4.-webkit-line-clamp 设置为2，表示超出2行的部分显示省略号，如果设置为3，那么就是超出3行部分显示省略号 */
						-webkit-line-clamp: 1;
						/* 5.字面意思：单词破坏：破坏英文单词的整体性，在英文单词还没有在一行完全展示时就换行  即一个单词可能会被分成两行展示 */
						word-break: break-all;
						/* 6.盒子实现多行显示的必要条件，文字是垂直展示，即文字是多行展示的情况下使用 */
						-webkit-box-orient: vertical;

						font-size: 37rpx;
					}

					.bo {
						width: 100%;

						.left {
							color: red;
							font-size: 35rpx;

							span {
								font-size: 24rpx;
								color: grey;
							}
						}



					}

				}
			}
		}


	}
</style>
